/*-----------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in
compliance with the License.You may obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1.1.html
	
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
	
The Original Code is Fever RS ( ActionScript 3 ) Framework code.
	
The Initial Developer of the Original Code is Romain Ecarnot.
Portions created by Initial Developer are Copyright (C) 2006
the Initial Developer. All Rights Reserved.
	
Contributor(s):
	
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-----------------------------------------------------------------------------*/

package fever.app.player 
{

	/**
	 * Host <strong>Flash Player</strong> informations.
	 * 
	 * @example
 	 * <listing version="3.0">
 	 * 
 	 * if( HostPlayer.isAir() )
 	 * {
 	 * 	FeverDebug.INFO( "on Air player" );
 	 * }
 	 * else
 	 * {
 	 * 	FeverDebug.INFO( HostPlayer.type );	
 	 * }
 	 * 
 	 * if( HostPlayer.isCompliant( 9, 0, 47 ) )
 	 * {
 	 * 	//...
 	 * }
 	 * </listing>
 	 * 
	 * @see fever.app.player.HostPlayer
	 * 
	 * @author Romain Ecarnot
	 */
	public interface IHostPlayer 
	{
		//--------------------------------------------------------------------
		// Public properties
		//--------------------------------------------------------------------
		
		/** Major of Flash player. */
		function get major() : int;

		/** Minor of Flash player. */
		function get minor() : int;

		/** Revision of Flash player. */
		function get revision() : int;

		/** Type of Flash player. */
		function get type() : String;
		
				
		//--------------------------------------------------------------------
		// Public API
		//--------------------------------------------------------------------
		
		/**
		 * Returns <code>true</code> if current player is a 
		 * <strong>ActiveX</strong> player.
		 */
		function isActiveX() : Boolean;

		/**
		 * Returns <code>true</code> if current player is a 
		 * <strong>Adobe Air</strong> player.
		 */
		function isAir() : Boolean;

		/**
		 * Returns <code>true</code> if current player is an 
		 * <strong>external</strong> player.
		 */
		function isExternal() : Boolean;
		
		/**
		 * Returns <code>true</code> if current player is a 
		 * <strong>plugin</strong> player.
		 */
		function isPlugin () : Boolean;
		
		/**
		 * Returns <code>true</code> if current player is a 
		 * <strong>standalone</strong> player.
		 */
		function isStandAlone () : Boolean;
		
		/**
		 * Checks if passed in flash player version is compliant to current 
		 * supported version.
		 * 
		 * @param maj Major version
		 * @param min Minor version
		 * @param rev ( optional ) revision version
		 * 
		 * @return <code>true</code> if version is compliant ( >= )
		 */
		function isCompliant( maj : int = 0, min : int = 0, rev : int = 0 ) : Boolean;
		
		/**
		 * Returns <code>true</code> if current player has 
		 * "FullScreen mode" support.
		 * 
		 * <p>Player is compliant if version >= 9.0.18
		 */
		function isFullScreenCompliant() : Boolean;

		/**
		 * Returns player version in string format. 
		 */
		function toVersionString() : String;		
	}
}
